#ifndef __TITLESCREEN_FRAME_H__
#define __TITLESCREEN_FRAME_H__

#include <QFrame>

class InvaderMenu;

/**
 * Screen which is presented to the user when the game is first started and
 * after a game is over
 */
class TitleScreen : public QFrame
{
  Q_OBJECT

public:
  /**
   * @param parent parent of the TitleScreen
   */
  TitleScreen (QWidget *parent = 0);

signals:
  /**
   * Emitted when the user selectes Begin New Game
   */
  void beginNewGame ();
  /**
   * Emitted when the user selected Quit
   */
  void quit ();
  /**
   * Emitted when the user selectes Clear Highscore
   */
  void clearHighscore ();
  /**
   * Emitted when this TitleScreen becomes visible
   */
  void shown ();
  /**
   * Emitted when keyboard activity is detected from the user
   */
  void activity ();

protected:
  void focusInEvent (QFocusEvent *event);
  void showEvent (QShowEvent *event);

private slots:
  void menuItemSelected (unsigned int item);
  void menuActivity ();

private:
  InvaderMenu *_menu;
};

#endif
